home *** CD-ROM | disk | FTP | other *** search
/ Trouble & Attitude 4 / Trouble and Attitude - Issue 04.iso / mac / DATA / MOVIES / COMMON.Cxt / 00132_Field_TEM-INTRO.txt < prev    next >
Text File  |  1997-01-14  |  5KB  |  172 lines

  1.  
  2. --
  3. -- INTRO Page Script
  4. --
  5.  
  6. on enterFrame
  7.   
  8.   global gMovieName, gMovie, gSoloMode
  9.   global gNextIcon, gPreIcon, gBackIcon, gControlIcon, gIndexIcon, gFirstIcon
  10.   global gButton1, gButton2, gButton3
  11.   global gLocalSound
  12.   global gMusicOn, gCaptionOn
  13.   global gCurPath, gNavMode
  14.   global gControlPanel, gHotText
  15.   global gMap1Icon, gMap2Icon
  16.   
  17.   -- Set up globals for this section 
  18.   
  19.   
  20.   set gNavMode = "intro"
  21.   
  22.   if voidP("gLocalSound") then set gLocalSound = FALSE
  23.   
  24.   if voidP("gMusicOn") then set gMusicOn = TRUE
  25.   if voidP("gCaptionsOn") then set gCaptionsOn = TRUE
  26.   
  27.   if voidP("gSoloMode") then set gSoloMode = TRUE
  28.   if voidP("gMovieName") then  set gMovieName = "*"
  29.   
  30.   if voidP(gCurPath) then
  31.     -- set up globals normally set up in START00.DIR
  32.     set gCurPath = "Breaking the Waves:Attitude Master:" -- fragile this path for test only
  33.   end if
  34.   
  35.   -- make sure the control panel is current in every way
  36.   
  37.   if objectP(gControlPanel) then
  38.     tell window "Control Panel"
  39.       setIconStatus "music", gMusicOn
  40.       setIconStatus "caption", gCaptionOn
  41.     end tell
  42.   end if
  43.   
  44.   -- Set up the sprite/channel relationship for this section 
  45.   
  46.   -- Intro Sprites
  47.   set gControlIcon = 4
  48.   set gButton1 = 5
  49.   set gButton2 = 6
  50.   set gButton3 = 7
  51.   set gIndexIcon = 8
  52.   
  53.   -- Chapter Sprites
  54.   set gNextIcon = 10
  55.   set gPreIcon = 11
  56.   
  57.   -- Control Panel Sprites
  58.   set gNextIcon = 10
  59.   set gPreIcon = 11
  60.   set gHotText = 12
  61.   
  62.   -- Chapter Sprites
  63.   set gMap1Icon = 13
  64.   set gMap2Icon = 14
  65.   
  66.   if voidP("gLocalSound") then
  67.     set gLocalSound = FALSE
  68.   else
  69.     set gLocalSound = FALSE
  70.   end if
  71.   
  72.   cursor -1
  73.   
  74.   puppetsprite gIndexIcon TRUE
  75.   puppetsprite gControlIcon TRUE
  76.   puppetsprite gButton1 TRUE
  77.   puppetsprite gButton2 TRUE
  78.    puppetsprite gButton3 TRUE
  79.   set the member of sprite gButton1 to member "button1-icon"
  80.   set the member of sprite gButton2 to member "button2-icon"
  81.   set the member of sprite gButton3 to member "button3-icon"
  82.   set the member of sprite gControlIcon to member "control-icon"
  83.   set the member of sprite gIndexIcon to member "index-icon"
  84.   
  85.   if rollOver(gButton1) then
  86.     set the member of sprite gButton1 to member "button1-icon-hot"
  87.     set the text of member "Message Text" to  "Article..."
  88.   else if rollOver(gButton2) then
  89.     set the member of sprite gButton2 to member "button2-icon-hot"
  90.     set the text of member "Message Text" to  "Video Interview..."
  91.   else if rollOver(gButton3) then
  92.     set the member of sprite gButton3 to member "button3-icon-hot"
  93.     set the text of member "Message Text" to  "Slide Show..."
  94.   else if rollOver(gControlIcon) then
  95.     set the member of sprite gControlIcon to member "control-icon-hot"
  96.     set the text of member "Message Text" to  "Reveal the control panel"
  97.   else if rollOver(gIndexIcon) then
  98.     set the member of sprite gIndexIcon to member "index-icon-hot"
  99.     set the text of member "Message Text" to  "Return to Table of Contents"
  100.   else
  101.     set the text of member "Message Text" to  "Click on one of the icons..."
  102.   end if
  103.   
  104.   dontPassEvent
  105.   
  106. end enterFrame
  107.  
  108. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  109.  
  110. on exitFrame 
  111.   
  112.   global gMovieName, gMovie, gSoloMode
  113.   global gTest
  114.   
  115.   if gSoloMode = FALSE then 
  116.     keepmusic
  117.   end if
  118.   
  119.   set gTest = 1
  120.   go to the frame 
  121.   
  122.   dontPassEvent
  123.   
  124. end exitFrame
  125.  
  126. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
  127.  
  128. on MouseUp
  129.   
  130.   global gMovieName, gMovie, gSoloMode
  131.   global gNextIcon, gPreIcon, gBackIcon, gIndexIcon, gFirstIcon, gControlIcon
  132.   global gButton1, gButton2, gButton3
  133.   
  134.   set destination = "*"
  135.   
  136.   if the ClickOn = gButton1 then
  137.     set destination = "C1"
  138.   end if
  139.   
  140.   if the ClickOn = gButton2 then
  141.     set destination =  "C2"
  142.   end if
  143.   
  144.   if the ClickOn = gButton3 then
  145.     set destination =  "C3"
  146.   end if
  147.   
  148.   if the ClickOn = gIndexIcon then
  149.     set destination = "index"
  150.   end if
  151.   
  152.   if the ClickOn = gControlIcon then
  153.     openControlPanel
  154.   end if
  155.   
  156.   
  157.   if destination <> "*" then
  158.     puppetsprite gButton1 FALSE
  159.     puppetsprite gButton2 FALSE
  160.     puppetsprite gButton3 FALSE
  161.     puppetsprite gIndexIcon FALSE
  162.     puppetsprite gControlIcon FALSE
  163.     if destination = "index" then
  164.       go to frame "Index" of movie "INDEX"
  165.     else
  166.       go to frame destination
  167.     end if
  168.   else
  169.     -- alert "Internal Error: I don't know where to go." -- we can't get here
  170.   end if
  171.   
  172. end MouseUp